package com.yunji.storage.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yunji.common.annotation.Excel;
import com.yunji.common.base.BaseDelFlagDO;
import com.yunji.common.base.IEventJbpm;
import com.yunji.storage.enums.StockTakeStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

;import java.io.Serializable;

/**
 * @Package com.yunji.storage.domain
 * FileName:	StockTake.java
 * Copyright:	Copyright © 2024 All Rights Reserved
 * Company:		云集互联
 * @version: 1.0
 * @since: JDK 1.8.0_202
 * Create at:   2024-08-30 09:46:36.263
 * Description:
 * 盘点表
 * Modification History:
 * Author					Date						Version			Description
 * --------------------------------------------------------------------------------
 * HuaAo				2024-08-30 09:46:36			1.0				1.0 Version
 */
@ApiModel(value = "v3_stocktake_table", description = "盘点表")
@TableName("v3_stocktake_table")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class StockTakeDO extends BaseDelFlagDO implements Serializable, IEventJbpm {
    private static final long serialVersionUID = -1L;

    @ApiModelProperty(value = "盘点ID")
    @TableId(type = IdType.AUTO)
    private java.lang.Long stocktakeId;

    @Excel(name = "盘点单号", width = 15)
    @ApiModelProperty(value = "盘点单号")
    private java.lang.String stocktakeCode;

    @Excel(name = "盘点标题", width = 15)
    @ApiModelProperty(value = "盘点标题", required = true)
    private java.lang.String stocktakeTitle;

    @Excel(name = "盘点类型 0-日常盘点 1-月度盘点 2-季度盘点 3-年终盘点", width = 15)
    @ApiModelProperty(value = "盘点类型 0-日常盘点 1-月度盘点 2-季度盘点 3-年终盘点", required = true)
    private java.lang.Integer stocktakeType;

    @Excel(name = "盘点状态 0-草稿 1-待盘点 2-盘点中 3-盘点结束 4-已完成 5-已取消 6-作废", width = 15)
    @ApiModelProperty(value = "盘点状态 0-草稿 1-待盘点 2-盘点中 3-盘点结束 4-已完成 5-已取消 6-作废")
    private java.lang.Integer stocktakeStatus;

    @ApiModelProperty(value = "发起单位")
    private java.lang.Long belongId;

    @Excel(name = "商品种类", width = 15)
    @ApiModelProperty(value = "商品种类")
    private java.lang.Integer productType;

    @ApiModelProperty(value = "申请人ID")
    private java.lang.Long applyId;

    @ApiModelProperty(value = "申请人所属ID")
    private java.lang.Long applyBelongId;

    @Excel(name = "申请人姓名", width = 15)
    @ApiModelProperty(value = "申请人姓名")
    private java.lang.String applyName;

    @Excel(name = "申请人所属名称", width = 15)
    @ApiModelProperty(value = "申请人所属名称")
    private java.lang.String applyBelongName;

    @Excel(name = "申请时间", width = 20)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "申请时间")
    private java.util.Date applyTime;

    @Excel(name = "开始时间", width = 20)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty("开始时间")
    private java.util.Date startTime;

    @ApiModelProperty(value = "审核人ID")
    private java.lang.Long auditId;

    @ApiModelProperty(value = "审核人所属ID")
    private java.lang.Long auditBelongId;

    @Excel(name = "审核人姓名", width = 15)
    @ApiModelProperty(value = "审核人姓名")
    private java.lang.String auditName;

    @Excel(name = "审核人所属姓名", width = 15)
    @ApiModelProperty(value = "审核人所属姓名")
    private java.lang.String auditBelongName;

    @Excel(name = "审核时间", width = 20)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "审核时间")
    private java.util.Date auditTime;

    @Excel(name = "审核状态 0-待审核 1-通过 2-驳回", width = 15)
    @ApiModelProperty(value = "审核状态 0-待审核 1-通过 2-驳回")
    private java.lang.Integer auditStatus;

    @Excel(name = "提交时间", width = 20)
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "提交时间")
    private java.util.Date commitTime;

    @Excel(name = "驳回原因", width = 15)
    @ApiModelProperty(value = "驳回原因")
    private java.lang.String reason;

    @Excel(name = "盘点备注", width = 15)
    @ApiModelProperty(value = "盘点备注")
    private java.lang.String remark;

    @ApiModelProperty("备注信息")
    @Excel(name = "备注信息", width = 15)
    private String remarks;

    @Override
    public Long getId() {
        return this.getStocktakeId();
    }

    @Override
    public Integer getNewStatus() {
        return this.getStocktakeStatus();
    }

    @Override
    public String getNewStatusName() {
        return StockTakeStatus.get(this.getStocktakeStatus());
    }

    @Override
    public Integer getEventType() {
        return 0;
    }
}
